package InheritanceDemo;

public class tach extends Staff{
    private int teachingAge;
    public tach(String id, String name, String gender, double salary,int teachingAge){
        super(id, name, gender,salary);
        this.teachingAge = teachingAge;

    }
    public void work(){
    System.out.println("从事教学工作，教龄" + teachingAge +"年");
    }




}